// 倒计时
setInterval(function(){
    let data = new Date()
    let newData = new Date('2022-10-2 24:00:00')
    let span = document.querySelectorAll('.seckill .timer')
    let sum = Math.floor((newData.getTime()-data.getTime())/1000)
    let h = Math.floor(sum/3600)
    let f =Math.floor(sum%3600/60) 
    let s = Math.floor(sum%3600%60) 
      
   span[0].innerHTML=fn(h)
   span[1].innerHTML=fn(f)
   span[2].innerHTML=fn(s)

   },1000)

   function fn(v){
    if(v<10){
        return '0'+v
    }else{
        return v
    }
   }